<ion-header *ngIf="!isFromMainPage">
  <ion-navbar no-border-bottom>
    <ion-title>首页({{name}})</ion-title>
  </ion-navbar>
</ion-header>
<ion-segment class="header_segment" [(ngModel)]="segment" (ionChange)="onSegmentChange($event)">
  <ion-segment-button value="{{item.name}}" *ngFor="let item of segments">
    <span>{{item.text}}</span>
  </ion-segment-button>
</ion-segment>
<ion-content class='todo-content' [ngSwitch]="segment">
  <ion-refresher (ionRefresh)="doRefresh($event)">
    <ion-refresher-content pullingText="下拉刷新" refreshingText="加载中...">
    </ion-refresher-content>
  </ion-refresher>
  <ion-list class='gfoa-list' *ngSwitchCase="'inbox'">
    <ion-item *ngFor="let item of listData[segment].data" tappable (click)="goEmailDetailPage(item)" [ngClass]="{ 'no-read': item.readflag==0} ">
      <ion-row class='first-row'>
        <ion-col width-80 class='left' [innerHTML]="item.bostitle"></ion-col>
        <ion-col width-20 class='right'>
          <span *ngIf="item.readflag==0 ">未阅</span>
          <span *ngIf="item.readflag==1 ">已阅</span>
          <span *ngIf="item.readflag==2 ">已回复</span>
        </ion-col>
      </ion-row>
      <ion-row class='second-row'>
        <ion-col width-50 class='left'>{{item.refenDtos[0].svalue}}</ion-col>
        <ion-col width-50 class='right'>{{item.sendtime}}</ion-col>
      </ion-row>
    </ion-item>
  </ion-list>
  <ion-list class='gfoa-list' *ngSwitchCase="'todo'">
    <ion-item *ngFor="let item of listData[segment].data" tappable (click)="goTaskDetailPage(item)">
      <ion-row class='first-row'>
        <ion-col width-80 class='left'>{{item.wkiProTitle}}</ion-col>
        <ion-col width-20 class='right'>
          {{item.boCreatorName}}
        </ion-col>
      </ion-row>
      <ion-row class='second-row'>
        <ion-col width-50 class='left'>{{item.wkiProName}}</ion-col>
        <ion-col width-50 class='right'>{{item.wkiCreateTime}}</ion-col>
      </ion-row>
    </ion-item>
  </ion-list>
  <ion-item-divider class='list-no-more-tips' color="light" [hidden]="listData[segment].isLoadMore">暂无更多数据...</ion-item-divider>
  <ion-infinite-scroll (ionInfinite)="doInfinite($event)">
    <ion-infinite-scroll-content loadingSpinner="bubbles" loadingText="加载更多数据...">
    </ion-infinite-scroll-content>
  </ion-infinite-scroll>
</ion-content>
